]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
extensionSystem: Unload stylesheet if extension is not loaded
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Fri, 3 Aug 2018 15:52:19 +0000 (17:52 +0200)
committerMarco Trevisan <mail@3v1n0.net>
Mon, 3 Sep 2018 23:29:01 +0000 (23:29 +0000)
We should not keep any reference to an extension custom stylesheet in case we
got an error while enabling that

js/ui/extensionSystem.js

index 3f23d273ea9be7ac2b725bcabbfcf95d46b36368..6611b5a636b560bc7850528269cc1525743801b4 100644 (file)
@@ -136,6 +136,10 @@ function enableExtension(uuid) {
         _signals.emit('extension-state-changed', extension);
         return;
     } catch(e) {
+        if (extension.stylesheet) {
+            theme.unload_stylesheet(extension.stylesheet);
+            delete extension.stylesheet;
+        }
         logExtensionError(uuid, e);
         return;
     }